<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8" />
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<meta name="renderer" content="webkit" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
	<title>注册</title>
	<link rel="stylesheet" type="text/css" href="css/themes/default/easyui.css"/>
	<link rel="stylesheet" type="text/css" href="css/themes/icon.css"/>
	<link rel="stylesheet" type="text/css" href="css/common.css" />
	<link rel="stylesheet" type="text/css" href="css/icon.css" />
    <link rel="stylesheet" type="text/css" href="css/register.css" />
	<style></style>
</head>
<body>
<div id="wrapper">
	<div class="aw-login-box">
<!--		<div class="right-bg">-->
<!--			<img th:src="@{'image/png.png'}" />-->
<!--		</div>-->
		<div class="mod-body clearfix">
			<div class="content ">
				<h1 class="title" style="text-align: center;">重置密码</h1>
				<form id="register_form" name="register_form" class="s_form" method="post" action="resetPassword">
					<ul>
						<li class="s_from_li">
							<table>
								<tr>
									<td class="s_form_title">
										<span>手机号码</span>
									</td>
									<td class="s_form_content">
										<input type="text" name="phone" id="telephoneNumber" class="easyui-textbox easyui-validatebox" placeholder="手机号码" data-options="required:true,validType:'mobile'"/>
									</td>
								</tr>
								<tr>
									<td class="s_form_title">
										<span>验证码</span>
									</td>
									<td class="s_form_content">
										<input type="text" name="smsCode" id="telephoneNumberV" class="easyui-textbox easyui-validatebox" placeholder="验证码" data-options="required:true,validType:'minLength[4]'"/>
										<button type="button" class="btn btn-large btn-danger" id="phoneCode" onclick="app.createsmsCode(2)">获取验证码</button>
									</td>
								</tr>
								<tr>
									<td class="s_form_title">
										<span>密码</span>
									</td>
									<td class="s_form_content">
										<input type="password" name="newPassword" class="easyui-textbox easyui-validatebox" placeholder="密码" data-options="required:true,validType:'minLength[6]'"/>
									</td>
								</tr>
							</table>
						</li>
						<li class="last">
							<div id="errorDiv" th:inline="text" style="height: 30px; text-align: left; color: red; margin: -20px 0 10px;">[[${error == null ? '' : error}]]</div>
							<a href="login" class="pull-left btn btn-large back">返回</a>
							<button type="button" class="pull-left btn btn-large btn-primary" onclick="submit()">完成</button>
						</li>
					</ul>
				</form>
			</div>
		</div>
	</div>
	<div class="footer_wrap">
		<p>技术支持：e2tt </p>
	</div>
</div>

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="js/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="js/Validate.js"></script>
<script type="text/javascript" src="js/app.js"></script>
<script type="text/javascript" th:inline="javascript">
	$(function() {
		var success = [[${success}]]
		if(success) {
			alert("恭喜您，密码修改成功！");
			window.location.href='login';
		}
		initHtml();
		$("input[name='phone']").prev().focus();
	});
	function initHtml(){
		$("#register_form").form("disableValidation");
	}
	/*<![CDATA[*/
	function submit(){
		$("#register_form").form("enableValidation");
		if($('#register_form').form('validate')){
			document.register_form.submit();
		}
	}
	/*]]>*/
</script>
</body>
</html>
